package com.deductive.domain.assumed;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.deductive.common.config.mybatis.JsonbTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.JsonNode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@ApiModel(value = "EnemyInfo", description = "敌情信息")
@TableName(value = "assumed_enemy_info", autoResultMap = true)
@Data
public class AssumedEnemyInfo implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "关联想定ID")
    @TableField(value = "assumed_id")
    private Long assumedId;

    @ApiModelProperty(value = "兵力部署（jsonb，可为数组/对象）")
    @TableField(value = "force_deployment", typeHandler = JsonbTypeHandler.class)
    private JsonNode forceDeployment;

    @ApiModelProperty(value = "重要目标（jsonb，可为数组/对象）")
    @TableField(value = "key_targets", typeHandler = JsonbTypeHandler.class)
    private JsonNode keyTargets;

    @ApiModelProperty(value = "作战意图（jsonb，可为数组/对象）")
    @TableField(value = "operation_intent", typeHandler = JsonbTypeHandler.class)
    private JsonNode operationIntent;

    @ApiModelProperty(value = "关联文件ID，逗号分隔（示意图、附件等）")
    @TableField(value = "file_ids")
    private String fileIds;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}


